#include  <cstdio>
#include  <cstring>

int main(int argc, char *argv[])
{
	int n,m,c,sum,counter=1;
	scanf("%d%d%d",&n,&m,&c);
	int d[100],s[100];
	while( n!=0 || m!= 0 || c != 0 )
	{
		sum = 0;
		memset(s,0,21*4);
		for( int i = 0; i < n ; ++i )
			scanf("%d",&d[i+1]);
		
		int dd,max = 0;
		bool broken = false;
		for( int i = 0; i < m ; ++i )
		{
			scanf("%d",&dd);
			if(broken)
				continue;
			if(s[dd] == 0)
			{
				s[dd] = 1;
				sum += d[dd];
				if(sum > c)
				{
					broken = true;
					continue;
				}
				max = sum > max ? sum : max;
			}
			else
			{
				s[dd] = 0;
				sum -= d[dd];
			}
		}

		printf("Sequence %d\n",counter++);
		if( broken )
			printf("Fuse was blown.\n\n");
		else
			printf("Fuse was not blown.\nMaximal power consumption was %d amperes.\n\n",
					max);
		
		scanf("%d%d%d",&n,&m,&c);
	}
}
